import { DailogModel } from '@/type/BaseType'
import { reactive } from 'vue'
/**
 * 弹框相关的操作
 */
export default function userDialog() {
    // 弹框的属性
    const dailog = reactive<DailogModel>({
        title: '',
        visible: false,
        height: 280,
        width: 630
    })
    // 展示
    const onShow = () => {
        dailog.visible = true
    }
    // 关闭
    const onClose = () => {
        dailog.visible = false
    }
    // 确认
    const onConfirm = () => {
        dailog.visible = false
    }

    return {
        dailog,
        onShow,
        onClose,
        onConfirm
    }
}